import React, { memo } from 'react';
import { getSizeImage } from '@/tools/data_format';
import { AlbumCoverWrapper } from './style';

const AlbumCover = memo((props) => {
    //state and props
    const { info, size=130, width=153, bgp='-845px' } = props
    return (
        <AlbumCoverWrapper size={size} width={width} bgp={bgp}>
            <div className="album-image">
                <img src={getSizeImage(info.picUrl,size)} alt=" "/>
                <a href="/todo" className="cover image_cover removeWarning">你看不见我,你看不见我</a>
            </div>
            <div className="album-info">
                <div className="name text-nowrap">
                    {info.name}
                </div>
                <div className="artist text-nowrap">
                    {info.artist.name}
                </div>
            </div>
        </AlbumCoverWrapper>
    );
});

export default AlbumCover;